/**
 * Project Name:YCApiServer-Api
 * File Name:UserCenterService.java
 * Package Name:com.yc.music.service.service103
 * Date:2016年5月10日下午1:25:36
 * Copyright (c) 2016 
 *
 */
package com.yc.music.service.service21;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import com.yc.music.common.context.YcContext;
import com.yc.music.common.util.RoomUtil;
import com.yc.music.mapper.cache.BootPageCacheMapper;
import com.yc.music.model.BootPage;

/**
 * 
 * ClassName: BootPageService <br/>
 * Function: 启动页. <br/>
 * Reason: TODO ADD REASON(可选). <br/>
 * date: 2016年8月28日
 *
 * @author qinhaiguan
 * @version
 */
@Service
public class BootPageService {

	@Value("${Pic_QiLiu}")
	private String pIC_QiLiu;
	
	@Autowired
	private BootPageCacheMapper bootPageCacheMapper;
	

	/**
	 * 
	 * getBootPage:获取启动页数据. <br/> 
	 * @param result
	 * @return
	 * @throws Exception
	 * @since JDK 1.7
	 */
	public Map<String,Object> getBootPage(Map<String,Object> result) throws Exception {
		
		BootPage boot = bootPageCacheMapper.getBootPage();
		if (null!=boot) {
			boot.setPic(RoomUtil.jointDomain(boot.getPic(),pIC_QiLiu));
		}
		
		result.put(YcContext.CODE, 200);
		result.put(YcContext.MESSAGE, YcContext.EMPTY_STRING);
		result.put(YcContext.DATA, boot);
		return result;
	}
	
	
}
